//定义接口
//首页用 - 展示数据接口
export interface IndexShowData {
  id: number;
  date: string;
  link?: string;
  title: string;
  content?: string;
  excerpt?: string;
  image: {
    url: string;
    caption: string;
    details: {
      width: number;
      height: number;
      filesize: number;
      sizes?: {
        medium: { source_url: string }; //300
        large: { source_url: string }; //1024
        thumbnail: { source_url: string }; //150
        medium_large: { source_url: string }; //768
        ywsl: { source_url: string }; //1536
        full: { source_url: string }; //全尺寸
      };
    };
  };
  cat: {
    //[name: string]: string;
    id: number;
    count: string;
    name: string;
    link: string;
  }[];
}

//查分类用接口
export interface GetCatData {
  id: number;
  count: string;
  link: string;
  name: string;
}
//查特色图片用接口
export interface GetImageData {
  id: number;
  guid: {
    rendered: string;
  };
  caption: {
    rendered: string;
  };
  alt_text: {};
  media_details: {
    width: number;
    height: number;
    filesize: number;
    sizes?: {
      medium: { source_url: string };
      large: { source_url: string };
      thumbnail: { source_url: string };
      medium_large: { source_url: string };
      ywsl: { source_url: string }; //1536
      full: { source_url: string };
    };
  };
}

//用户返回值
export interface UserReturn {
  data: {
    token: string;
    user_display_name: string;
    user_email: string;
    user_nicename: string;
  };
}
//用户信息
export interface UserData {
  id: number;
  avatar_urls: {};
  url: string;
  description: string;
  link: string;
  slug: string;
}

//设置

export interface GetOption {
  comm_h5_index_tone: Array<number>;
  comm_h5_index_tone_cat: number;
  comm_h5_index_category: number;
  comm_h5_single_contact_title: string;
  comm_h5_single_contact_one_title: string;
  comm_h5_single_contact_one_content: string;
  comm_h5_single_contact_two_title: string;
  comm_h5_single_contact_two_content: string;
  comm_h5_singel_featured_link: string;
  comm_h5_singel_featured_logo: number;
  comm_h5_singel_featured_msg: string;
}

//导出的设置信息

export interface GetOptionData {
  index: {
    tone: {
      carousel: number[];
      category: number;
    };
    more: {
      category: number;
    };
  };
  single: {
    contact: {
      title: string;
      content: {
        title: string;
        content: string;
      }[];
    };
    featured: {
      link: string;
      logo: number;
      msg: string;
    };
  };
}
